// 被拓展对象
const dependencies = {
  http: require("./http"),
  check: require("./check.js"),
  redis: require("./redis")
};
//拓展函数
function contextExtend(app, targetObj) {
  for (let key in targetObj) {
    app.context[key] = targetObj[key];
  }
}

//对外暴露拓展函数
module.exports = function(app) {
  for (let target in dependencies) {
    contextExtend(app, target);
  }
};
